/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"E38BF088-D1DB-455E-A11A-734E1A593736"}
 */
function btn_volver(event) {
	
	forms.Inicio.elements.tab_mostrar.removeAllTabs();
	forms.Inicio.elements.tab_mostrar.addTab(forms.CLIENTES);
	
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"46A1CB9B-D9B6-446C-911F-3E0FDE184462"}
 * @AllowToRunInFind
 */
function btn_buscar_vendedor(event) {
	
	var win = application.createWindow(application.getUUID().toString(),JSWindow.MODAL_DIALOG);
	win.resizable = false;
	win.storeBounds = false;
	win.title = "Busqueda de Vendedor";
	win.undecorated = false;
	win.show(forms.VENDEDOR_BUSCAR);
	
	// El dataprovider del combolist es vendedores, por lo tanto, es ése el que tengo que modificar
	vendedores = forms.VENDEDOR_lst.foundset.getSelectedRecord().vendedores_id;
	
	//:P
	
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"539DF3E3-5F5E-4DAC-9C9D-38BF7F7C7B07"}
 */
function btn_baja_cliente(event) {
	var success = plugins.dialogs.showWarningDialog("Eliminar Registro","¿Está seguro de querer eliminar este registro?","Aceptar", "Candelar");
	if (success == "Aceptar"){
		databaseManager.revertEditedRecords();
		foundset.deleteRecord(foundset.getSelectedRecord());
		forms.Inicio.elements.tab_mostrar.removeAllTabs();
		forms.Inicio.elements.tab_mostrar.addTab(forms.CLIENTES);
	
	}else{
		return;
	}
}
